﻿// ┌────────────────────────────────────────────────
// │  control class :: requirement
// │  1 :: rms.core.js
// └────────────────────────────────────────────────
//=====================================================================================================
// Class Base Control Contructor
//=====================================================================================================
(function (RMS) {
    function BaseControl(settings) {
        this.init(settings);
    };

    BaseControl.prototype.extend = function () {
        var baseClass = this.constructor;
        function Control() {
            baseClass.apply(this, arguments);
        }

        function inherit(Child, Parent) {
            function Bridge() { };

            Bridge.prototype = Parent.prototype;
            Child.prototype = new Bridge();
            Child.prototype.constructor = Child;
            return Child;
        };

        return inherit(Control, baseClass);
    };

    BaseControl.prototype.init = function () {
        throw Error('BaseControl init() method unimplemented');
    };

    BaseControl.prototype.load = function () {
        throw Error('BaseControl load() method unimplemented');
    };

    BaseControl.prototype.getInstance = function () {
        throw Error('BaseControl getInstance() method unimplemented');
    };

    BaseControl.prototype.updateSettings = function () {
        throw Error('BaseControl updateSettings() method unimplemented');
    };

    BaseControl.prototype.getSettings = function () {
        throw Error('BaseControl getSettings() method unimplemented');
    };

    //something here: enable/disable,...

    RMS.BaseControl = BaseControl;
})(RMS);
